#pragma once
#include "stdafx.h"
#include "BinaryJsonObject.h"
#include "BinaryJsonElement.h"
#include "StringData.h"

class BinaryJsonBuilderBase
{
public:
public:
	virtual ~BinaryJsonBuilderBase() {}

	virtual BinaryJsonObject obj() = 0;  // get the document


	virtual BinaryJsonBuilderBase& append( const BinaryJsonElement& e) = 0;

	virtual BinaryJsonBuilderBase& append( const StringData&  fieldName , int n ) = 0;

	virtual BinaryJsonBuilderBase& append( const StringData&  fieldName , long long n ) = 0;

	virtual BinaryJsonBuilderBase& append( const StringData&  fieldName , double n ) = 0;

	virtual BinaryJsonBuilderBase& appendArray( const StringData&  fieldName , const BinaryJsonObject& subObj ) = 0;

	virtual BinaryJsonBuilderBase& appendAs( const BinaryJsonElement& e , const StringData&  filedName ) = 0;

	virtual void appendNull( ) = 0;

	virtual BinaryJsonBuilderBase& operator<<( const BinaryJsonElement& e ) = 0;

	virtual bool isArray() const = 0;
};

